package com.youboy.wechatapi.domain.mysql;

import java.io.Serializable;
import java.util.Date;

import com.youboy.wechatapi.domain.enums.BindType;

/**
 * @ProjectName：wechatbind
 * @author：冉尧（Yvan）
 * @CreateTime：2014年10月9日 上午11:27:51
 * @Remarks： 商铺绑定信息
 */
@SuppressWarnings("serial")
public class BindInfo implements Serializable {
	
	private int bindId;

	// 微信对应公众账号唯一id
	private String openid;

	// 商铺用户名
	private String username;

	//状态：0.绑定  1.解绑
	private int status;
	
	//绑定类型：0.直接绑定，1.微信注册后绑定
	private int type;
	
	// 绑定时间
	private Date bindTime;
	
	//解绑时间
	private Date unBindTime;

	public int getBindId() {
		return bindId;
	}

	public void setBindId(int bindId) {
		this.bindId = bindId;
	}

	public String getOpenid() {
		return openid;
	}

	public void setOpenid(String openid) {
		this.openid = openid;
	}

	public String getUsername() {
		return username;
	}

	public void setUsername(String username) {
		this.username = username;
	}

	public Date getBindTime() {
		return bindTime;
	}

	public void setBindTime(Date bindTime) {
		this.bindTime = bindTime;
	}
	
	public int getStatus() {
		return status;
	}

	public void setStatus(int status) {
		this.status = status;
	}

	public int getType() {
		return type;
	}

	public void setType(int type) {
		this.type = type;
	}

	public Date getUnBindTime() {
		return unBindTime;
	}

	public void setUnBindTime(Date unBindTime) {
		this.unBindTime = unBindTime;
	}


	public BindInfo() {
		// TODO Auto-generated constructor stub
	}
	
	public BindInfo(String openid, String username, BindType type) {
		super();
		this.openid = openid;
		this.username = username;
		this.type = type.value();
		this.bindTime = new Date();
	}

	
}
